package com.bitoon.basketdudes.web.jpa;

import java.io.Serializable;
import javax.persistence.*;

@Embeddable
public class RopaJugadorPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "jugador_id")
    private int jugadorId;

    /*
    @Basic(optional = false)
    @Column(name = "ropa_id", insertable = false, updatable = false)
    private short ropaId;
     *
     */

    @OneToOne
    @JoinColumn(name = "ropa_id", referencedColumnName = "id")
    private Ropa ropa;

    public RopaJugadorPK() {
    }

    /*
    public RopaJugadorPK(int jugadorId, short ropaId) {
        this.jugadorId = jugadorId;
        this.ropaId = ropaId;
    }
     *
     */

    public int getJugadorId() {
        return jugadorId;
    }

    public void setJugadorId(int jugadorId) {
        this.jugadorId = jugadorId;
    }

    public Ropa getRopa() {
        return ropa;
    }

    public void setRopa(Ropa ropa) {
        this.ropa = ropa;
    }

    /*
    public short getRopaId() {
        return ropaId;
    }

    public void setRopaId(short ropaId) {
        this.ropaId = ropaId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) jugadorId;
        hash += (int) ropaId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RopaJugadorPK)) {
            return false;
        }
        RopaJugadorPK other = (RopaJugadorPK) object;
        if (this.jugadorId != other.jugadorId) {
            return false;
        }
        if (this.ropaId != other.ropaId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bitoon.basketdudes.web.jpa.RopaJugadorPK[jugadorId=" + jugadorId + ", ropaId=" + ropaId + "]";
    }
     * 
     */

}
